import { defineComponent } from "vue";
import style from "./index.module.less";
import { popTitleProps } from "./type";
import { Divider } from "vant";
export default defineComponent({
  name: "",
  props: popTitleProps,
  setup(_) {
    const renderCenter = () => {
      return (
        <div class="flex items-center justify-center h-[62px] text-[16px] text-[#333]">
          {_.title}
        </div>
      );
    };
    const renderLeft = () => {
      return (
        <div class="flex items-center h-[62px] text-[16px] text-[#333] px-[14px] box-border">
          {_.title}
        </div>
      );
    };
    const renderView = () => {
      switch (_.type) {
        case "center":
          return renderCenter();
        case "left":
          return renderLeft();
      }
    };
    const renderClose = () => {
      return <div></div>;
    };
    return () => {
      return (
        <div>
          {renderView()}
          <Divider class="!mt-[0px] !mb-[0px]" />
        </div>
      );
    };
  },
});
